package com.yc.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.time.LocalDateTime;

/**
 * 题目选项实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("testOptions")
public class TestOption {
    
    @TableId(value = "optionId", type = IdType.AUTO)
    private Long optionId;
    
    @TableField("questionId")
    private Long questionId;
    
    @TableField("optionText")
    private String optionText;
    
    @TableField("optionValue")
    private Integer optionValue;
    
    @TableField("sortOrder")
    private Integer sortOrder;
    
    @TableField(value = "createTime", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    // 前端需要的字段格式
    @TableField(exist = false)
    private String text; // 对应 optionText
    
    @TableField(exist = false)
    private Integer value; // 对应 optionValue
} 